using System;
using System.Collections.Generic;
using System.Text;

namespace Sedna.Core.Controller.Configurations
{
    public abstract class DataListConfiguration : EnterTypeConfiguration, IDataListConfiguration, ICloneable
    {
        private IListController controller;

        private string dataSourceBindPath;
        private string dataSourceUnbindPath;

        private string dataTextField;
        private string dataValueField;

        private string dataValueFieldUnbindPath;
        private string dataTextFieldUnbindPath;
        private string dataTextFieldBindPath;
        private string dataValueFieldBindPath;

        private string selectedIndexBindPath;
        private string selectedIndexUnbindPath;
        private string selectedTextUnbindPath;
        private string selectedValueBindPath;
        private string selectedValueUnbindPath;

        # region IDataListConfiguration

        public IListController Controller
        {
            get { return controller; }
            set { controller = value; }
        }

        public string DataSourceBindPath
        {
            get { return dataSourceBindPath; }
            set { dataSourceBindPath = value; }
        }

        public string DataSourceUnbindPath
        {
            get { return dataSourceUnbindPath; }
            set { dataSourceUnbindPath = value; }
        }

        public string DataSourcePath
        {
            set
            {
                dataSourceBindPath = value;
                dataSourceUnbindPath = value;
            }
        }        

        public string DataTextField
        {
            get { return dataTextField; }
            set { dataTextField = value; }
        }

        public string DataValueField
        {
            get { return dataValueField; }
            set { dataValueField = value; }
        }


        public string DataTextFieldBindPath
        {
            get { return dataTextFieldBindPath; }
            set { dataTextFieldBindPath = value; }
        }

        public string DataTextFieldUnbindPath
        {
            get { return dataTextFieldUnbindPath; }
            set { dataTextFieldUnbindPath = value; }
        }

        public string DataTextFieldPath
        {
            set
            {
                dataTextFieldBindPath = value;
                dataTextFieldUnbindPath = value;
            }
        }

        public string DataValueFieldBindPath
        {
            get { return dataValueFieldBindPath; }
            set { dataValueFieldBindPath = value; }
        }

        public string DataValueFieldUnbindPath
        {
            get { return dataValueFieldUnbindPath; }
            set { dataValueFieldUnbindPath = value; }
        }

        public string DataValueFieldPath
        {
            set
            {
                dataValueFieldBindPath = value;
                dataValueFieldUnbindPath = value;
            }
        }

        public string SelectedIndexBindPath
        {
            get { return selectedIndexBindPath; }
            set { selectedIndexBindPath = value; }
        }

        public string SelectedIndexUnbindPath
        {
            get { return selectedIndexUnbindPath; }
            set { selectedIndexUnbindPath = value; }
        }

        public string SelectedIndexPath
        {
            set
            {
                selectedIndexBindPath = value;
                selectedIndexUnbindPath = value;
            }
        }

        public string SelectedTextUnbindPath
        {
            get { return selectedTextUnbindPath; }
            set { selectedTextUnbindPath = value; }
        }

        public string SelectedValueBindPath
        {
            get { return selectedValueBindPath; }
            set { selectedValueBindPath = value; }
        }

        public string SelectedValueUnbindPath
        {
            get { return selectedValueUnbindPath; }
            set { selectedValueUnbindPath = value; }
        }

        public string SelectedValuePath
        {
            set
            {
                selectedValueBindPath = value;
                selectedValueUnbindPath = value;
            }
        }		
        
        # endregion

        # region ICloneable

        public object Clone()
        {
            return this.MemberwiseClone();
        }

        # endregion
    }
}
